-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix use RequestStack instead of Request #118
Conversation
Thanks! Can you fix the unit test? |
@matthijsch If there is anything else you want me to correct, don't hesitate. |
Cookie/CookieChecker.php
Outdated
{ | ||
$this->request = $request; | ||
$this->request = $request->getCurrentRequest(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't call getCurrentRequest()
in the constructor, but in the method in which it is used. The reason is, that the constructor is called during service generation (when it is injected into another service) but the actual usage may be later, so the "current request" may be another one at that point.
https://symfony.com/doc/current/service_container/request.html
Thanks for taking the time to look at my code |
@jdreesen @matthijsch @upskaling this is awesome ! Looking forward to it being merged ! |
Sadly we seem to be experiencing some issues with Github and PR's were automatically closed and can't be reopened. Thank you for your work, I've created a new PR #125 and also replaced RequestStack for the logger |
I tried to fix issues #65
Let me know if I can improve Pull requests
bin/console lint:container
fails #65